import Cookies from 'js-cookie'

const TokenKey = 'access_token'
const exp = 'access_token_exp'
const Type = 'access_token_Type'

export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

export function setExp(exptime) {
  return Cookies.set(exp, exptime)
}

export function getExp() {
  return Cookies.get(exp)
}

export function removeExp() {
  return Cookies.remove(exp)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}
export function getTokenType() {
  return Cookies.get(Type)
}

export function setTokenType(type) {
  return Cookies.set(Type, type)
}

export function removeTokenType() {
  return Cookies.remove(Type)
}
